<template>
  <view class="hotal">
    <image :src="hotal.img" class="img" @click="toHotalDetal"></image>
    <text class="text">{{hotal.text}}</text>
    <uni-rate :size="15" v-model="hotal.num"/>
  </view>
</template>

<script>
  export default {
    name:"my-hotal",
    props: {
      hotal: {
        type: Object,
        default: {}
      }
    },
    data() {
      return {
        
      };
    },
    methods: {
      toHotalDetal(){
        this.$emit('toHotalDetal')
      }
    }
  }
</script>

<style lang="scss">
.hotal {
  width: 150px;
  height: 180px;
  font-weight: bold;
 .img {
   width: 100%;
   height: 70%;
   border-radius: 10px;
 } 
 text {
   display: block;
   margin: 5px 0;
  
 }
}
</style>